<!DOCTYPE html>
<html>
<head>
    <title>我的游记</title>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="/js/bootstrap-4.1.1-dist/css/bootstrap.min.css">
    <script src="/js/jquery/jquery.min.js"></script>
    <script src="/js/bootstrap-4.1.1-dist/js/bootstrap.min.js"></script>
    <script src="/js/plugins/jrender/jrender.min.js"></script>
    <link rel="stylesheet" href="/css/font/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="/css/reset.css"/>
    <link rel="stylesheet" href="/css/userTravels.css"/>
    <link rel="stylesheet" href="/js/plugins/dialog2/dialog.css"/>
    <script src="/js/plugins/dialog2/dialog.min.js"></script>
    <script src="/js/common.js"></script>
    <script src="/js/queryAndBlank.js"></script>
    <style type="text/css">
        .bk{
            background-image: url(/upload/80.jpg);
            background-position: center;
            background-size:40%;
            opacity: 2;
        }
        span{
            color: red;
        }
        h7{
            color: whitesmoke;
        }
        h3{
            color: blueviolet;
            font-size: 30px;
        }
    </style>
    <script>
        $(function () {
            var param=getParams();
            //根据当前id去查商品信息
            $.get(baseUrl+"/stores/"+param.id,function (data) {
                $(".allsp").renderValues(data);
            })

            $(".shopping-car").click(function () {
                var userStr = sessionStorage.getItem('user');
                var user;
                if (userStr){
                    user = JSON.parse(userStr);
                }else {
                    window.location.href = '/login.html';
                }

                $.get(baseUrl+'/sessions',function (data) {
                    if (data.user==null){
                        window.location.href = '/login.html';
                    }
                })

                var nums=$("#nums").val();
                var json={
                    number:nums,
                    state:1
                }
                $.post(baseUrl+'/usergoods/'+user.id+'/store/'+param.id,json,function (data) {
                    if (data.success){
                        $(document).dialog({
                            autoClose: 2000,
                            content: '已加入购物车了',
                        });
                    }
                })
            })
        })
    </script>
</head>
<body background="/upload/15.jpg"></body>
<body>
<div class="search-head">
    <div class="row nav-search">
        <div class="col-3">
            <a href="javascript:history.go(-1);">
                    <span><i class="fa fa-chevron-left fa-2x "
                             style="color:white;font-size:25px;position: absolute;top:10%;left:30%"></i></span>
            </a>

        </div>
        <div class="col-1"></div>
        <div class="col-5">
            <div class="input-group-sm search">
                <span style="color: white;font-size: 18px;left: 100%;">商品详情</span>
            </div>
        </div>
        <div class="col-1">
            <a href="/mine/myList.html">
                <i class="fa fa-shopping-cart"
                   style="color:white;font-size:25px;position: absolute;top: 23%;left: 50%">
                </i>
            </a>
        </div>
        <div class="col-1">
            <a href="/index.html">
                <i class="fa fa-home"
                   style="color:white;font-size:25px;position: absolute;top: 23%;left: 50%">
                </i>
            </a>
        </div>
    </div>
</div>
    <div class="allsp">
        <figure >
            <div>
                <img class="img-responsive" render-src="picture" width="100%"/>
                <em><h3 class="tb-main-title" render-html="diseribe" ></h3></em>
                <em style="margin-left:0px; ">
                    需要<span render-html="price" style="font-size: 30px;"></span><span>积分</span>
                </em>
            </div>

        </figure>
    </div>

     购买的数量<input type="text" value="1" id="nums" style="width: 100px;">
    <button type="button" class="btn btn-success btn-lg shopping-car" style="margin-left:0px;"
        id="cart" data-count>加入购物车</button>

    <div class="sjxx">
        <p class="pclass2">发货地址：广州 天河区 棠下</p>
        <p class="pclass2">电话：122 333 44444</p>
    </div>
    <div class="zshlogo">
        <p style="color: red; font-size:15px;">猫头鹰研发中心</p>
    </div>

    分享到<br>
<a  href="javascript:void(window.open('https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=localhost:8080/mine/commodity.html?id='+getParams().id+'&title=你看'));" title="分享到QQ空间"> <img src="/upload/41.jpg" width="8%"> QQ空间<i class="iconfont icon-qqkongjian font-white"></i> </a>
<a href="http://connect.qq.com/widget/shareqq/index.html?title='旅游物品'&url=http://localhost:8080/mine/store.html" target="_blank"><img src="/upload/45.jpg" width="8%"> 腾讯朋友</a>
<a href="http://v.t.sina.com.cn/share/share.php?url=http://www.jb51.net&title=http://localhost:8080/mine/store.html" target="_blank"><img src="/upload/43.png" width="8%"> 新浪微博</a>
<a href="http://www.douban.com/recommend/?url=http://www.jb51.net&title=http://localhost:8080/mine/commodity.html?id=3" target="_blank"><img src="/upload/44.jpg" width="8%">豆瓣</a>

</div>




</body>
</html>
